package com.apes.fico.finance.respository;

import com.apes.fico.finance.model.gl.GLVoucherPool;
import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.scm.masterdata.party.model.PartyRole;

import java.util.List;

public interface GLVoucherPoolRepository extends CustomRepository<GLVoucherPool, String> {

    GLVoucherPool findFirstByCompanyAndPeriodAndYearAndHandworkFlagAndCancelOrderByVoucherNoAsc(PartyRole company, String period, int year, boolean handworkFlag, int cancel);

    GLVoucherPool findFirstByCompanyAndPeriodAndYearAndHandworkFlagOrderByVoucherNoDesc(PartyRole company, String period, int year, boolean handworkFlag);

    GLVoucherPool findByCompanyAndPeriodAndYearAndVoucherNoAndHandworkFlag(PartyRole company, String period, int year, int voucherNo,boolean handworkFlag);


}
